import React, { Component } from 'react'

function tplFrom(Comp){
  return class wrapperComp extends Component{
    constructor(props){
      super(props)
      this.handleChage = this.handleChage.bind(this)
      this.state = {}
    }
    handleChage(k,v){
      this.setState({
        [k]:v
      })
    }
    render(){
      return (
        <div>
          <Comp state = {this.state} handleChage = {this.handleChage} {...this.props}></Comp>
        </div>
      )
    }
  }
}

export default tplFrom